﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="PageList.aspx.cs" Inherits="CARMS.SysPage.PageList" %>

<%@ Import Namespace="CARMSBusiness.InterFace" %>
<%@ Register Src="~/Controls/GridPager.ascx" TagName="GridPager" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/ConditionControl.ascx" TagName="ConditionControl" TagPrefix="ucc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   <asp:Panel ID="Panel1" runat="server" DefaultButton="btnSearch">
                <table border="0" cellpadding="0" cellspacing="5">
                    <tr>
                        <td>
                            <ucc:ConditionControl runat="server" ID="controlCondition" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:Button ID="btnSearch" runat="server" Text="Search" OnClick="btnSearch_Click"
                                SkinID="Button90" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="Button1" runat="server" Text="View All" OnClick="btnViewAll_Click"
                                SkinID="Button90" />
                        </td>
                    </tr>
                </table>
            </asp:Panel>
    <fieldset>
        <legend>Page List</legend>
        <div style="margin-top: 10px">
            <vs:GridView ID="gridList" runat="server" AutoGenerateColumns="False" AllowSorting="true"
                OnRowDataBound="gridList_RowDataBound" OnRowCommand="gridList_RowCommand">
                <columns>
                    <asp:TemplateField HeaderText="Edit">
                        <ItemTemplate>
                            <asp:ImageButton ID="btnView" runat="server" SkinID="Modify" CommandName="ViewItem"
                                CommandArgument='<%#Eval("ActionID") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                        <vs:TemplateField HeaderText="Page Name" SortExpression="ActionName">
                        <ItemTemplate>
                            <%#Eval("ActionName")%>
                        </ItemTemplate>
                    </vs:TemplateField>
                    <vs:TemplateField HeaderText="Page ID" SortExpression="ActionID">
                        <ItemTemplate>
                            <%#Eval("ActionID")%>
                        </ItemTemplate>
                    </vs:TemplateField>
                    <vs:TemplateField HeaderText="Parent ID" SortExpression="ParentID" >
                        <ItemTemplate>
                            <%#Eval("ParentID")%>
                        </ItemTemplate>
                    </vs:TemplateField>
                       <vs:TemplateField HeaderText="Sort Index" SortExpression="SortIndex">
                        <ItemTemplate>
                           <%#Eval("SortIndex")%>
                        </ItemTemplate>
                    </vs:TemplateField>
                     <vs:TemplateField HeaderText="DB Table Name" SortExpression="DBTableName">
                        <ItemTemplate>
                           <%#Eval("DBTableName")%>
                        </ItemTemplate>
                    </vs:TemplateField>
                    <asp:TemplateField HeaderText="Create Date" SortExpression="CreateDate">
                        <ItemTemplate>
                            <%#((DateTime)Eval("CreateDate")).ToString(ApplicationConfiguration.DateFormat)%>
                        </ItemTemplate>
                    </asp:TemplateField>
                           <asp:TemplateField HeaderText="Operation"  >
                        <ItemTemplate>
                           <asp:ImageButton runat="server" ID="btnConfigGridList" SkinID="Confirm" ToolTip="Config Grid List" CommandName="ConfigGrid"  CommandArgument='<%#Eval("ActionID") %>'/>
                        </ItemTemplate>
                    </asp:TemplateField>
                </columns>
            </vs:GridView>
            <uc1:GridPager ID="PageQueryAdapter1" runat="server" TargetControlID="gridList" PageSize="20"
                OnPerformGetCondition="PageQueryAdapter1_PerformGetCondition" OnPerformGetRecordCount="PageQueryAdapter1_PerformGetRecordCount"
                OnPerformGetPageData="PageQueryAdapter1_PerformGetPageData" />
    </fieldset>
</asp:Content>
